package com.biz.storage.adapter;

import com.biz.storage.entity.*;
import org.springframework.web.multipart.*;

import java.io.*;
import java.util.*;

/**
 * @Description
 *      文件存储适配器
 * @Author liuxi
 * @Date 2024/4/26
 **/
public interface StorageAdapter {

    /**
     * 创建bucket
     */
    void createBucket(String bucket);

    /**
     * 上传文件
     */
    void uploadFile(MultipartFile uploadFile, String bucket, String objectName) throws IOException;

    /**
     * 下载文件
     */
    InputStream downLoad(String bucket, String objectName);

    /**
     * 删除文件
     */
    void deleteObject(String bucket, String objectName);
}
